<%--
  Created by IntelliJ IDEA.
  User: Root404
  Date: 2022/7/8
  Time: 16:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <link rel="shortcut icon" href="#"/>
</head>
<body>
<p>分页</p>
<table border="4">
    <tr>
        <th>id</th>
        <th>name</th>
        <th>sex</th>
        <th>操作</th>
    </tr>
    ${pageInfo.total} 当前页${pageInfo.pageNum}
    <c:forEach items="${pageInfo.list}" var="xjj">
    <tr>
        <td>${xjj.id}</td>
        <td>${xjj.name}</td>
        <td>${xjj.sex}</td>
        <td>操作</td>
    </tr>
    </c:forEach>
</table>
<a href="${pageContext.request.contextPath}/findUserByPage?currentPage=1">首页</a>
<a ${pageInfo.hasPreviousPage?"":"hidden"} href="${pageContext.request.contextPath}/findUserByPage?currentPage=${pageInfo.pageNum-1}">上一页</a>
<a  ${pageInfo.hasNextPage?"":"hidden"}  href="${pageContext.request.contextPath}/findUserByPage?currentPage=${pageInfo.pageNum+1}">下一页</a>
<a href="${pageContext.request.contextPath}/findUserByPage?currentPage=${pageInfo.pages}">尾页页</a>
<%--<script src="${pageContext.request.contextPath}/statics/js/jquery.js"></script>
<script>
$("p").css("background-color","red");
</script>--%>
</body>
</html>
